//使用级联if else if打印分段函数
#include<stdio.h>
int main(void)
{
    int x;

    printf("Plea se enter int X:_\b");
    scanf("%d",&x);
       if(x>0){
       printf("f(x)=%d\n",2*x);
   }else if(x<0){
       printf("f(x)=-1\n");
   }else {

       printf("f(x)=0\n");
   }

   printf("You are successful");

   return 0;
    
}